import mongoengine

from academic.settings import MONGODB

class FullSearch(mongoengine.DynamicDocument):
    meta = {'collection': MONGODB.get('FULLSEARCH')}

    id = mongoengine.StringField(db_field='_id', max_length=50, primary_key=True)
    chicontent = mongoengine.StringField(db_field='中文名称', max_length=50, required=True)
    engcontent = mongoengine.StringField(db_field='英文描述', max_length=50)

    def __str__(self):
        return "项目id" + str(self.id) + "\t 中文名称" + str(self.chicontent)

